From 2e7f14c90f02144a572ced04e0c9b5016e6b46ce Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Wed, 22 Dec 2010 17:08:25 +0100 Subject: [PATCH] quartz: GdkDeviceCore: check for NULL pointer --- gdk/quartz/gdkdevice-core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gdk/quartz/gdkdevice-core.c b/gdk/quartz/gdkdevice-core.c index 3244a438c5..65c24fa890 100644 --- a/gdk/quartz/gdkdevice-core.c +++ b/gdk/quartz/gdkdevice-core.c @@ -241,8 +241,11 @@ gdk_device_core_query_state_helper (GdkWindow *window, translate_coords_to_child_coords (window, found_window, &x_tmp, &y_tmp); - *x = x_tmp; - *y = y_tmp; + if (x) + *x = x_tmp; + + if (y) + *y = y_tmp; return found_window; } -- 2.30.2